home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbnws102.zip
/
GRAPHSPK.ZIP
/
SCR9BITS.BAS
< prev
Wrap
BASIC Source File
|
1989-12-28
|
2KB
|
66 lines
'======================= SCR9BITS.BAS ==================================
' Quick Basic 4.5
' Copyright 1989 - Frederick Volking
' All Rights released to public domain by original author on 12/01/89
'
' =====================================================================
'
' This program displays the bit-map for a 16x16 pixel image stored
' with the graphics GET image command for Screen 9 - EGA color.
'
' This program requires the function BITON.BAS be merged with it.
'
' ==================================================================
' Author: Frederick Volking
' Contact: (415)952-3450 [home] (415)378-4640 [work]
' USPO Mail: 425 Larch Avenue - South San Francisco, CA 94080
' EchoMail: ANY Basic conference (I try to read them all)
' Library At: QBCentral BBS - Vancouver Washington (206)892-7500
' ==================================================================
DEFINT A-Z
CLS
SCREEN 9
IntsNeeded = 66
MaxClrs = 15
DIM A(1 TO IntsNeeded)
FOR Clr = 1 TO MaxClrs
CLS
LINE (0, 0)-(15, 15), Clr, B
LINE (0, 0)-(15, 15), Clr
GET (0, 0)-(15, 15), A
LOCATE 1, 10: PRINT "Integers Used = "; IntsNeeded
LOCATE 2, 10: PRINT "Array Element 1 = "; A(1)
LOCATE 3, 10: PRINT "Array Element 2 = "; A(2)
LOCATE 4, 10: PRINT "Color = "; Clr
PRINT
FOR C = 3 TO IntsNeeded STEP 4
FOR D = 0 TO 3
B = C + D
FOR Bit = 1 TO 8
IF (BitOn(Bit, A(B))) THEN PRINT "1"; ELSE PRINT "0";
NEXT
PRINT " ";
FOR Bit = 9 TO 16
IF (BitOn(Bit, A(B))) THEN PRINT "1"; ELSE PRINT "0";
NEXT
PRINT " ";
NEXT
PRINT
NEXT
DO: K$ = INKEY$: LOOP WHILE K$ = ""
IF K$ = CHR$(27) THEN
SCREEN 0, 0
CLS
END
END IF
NEXT
SCREEN 0, 0
CLS
END